package com.qkl.common.publics.utils;

public enum CommonEnum implements BaseErrorInfo {
    BAD_ACCESS(401, "认证失败!"),
    NOT_USER(401, "用户名不存在!"),
    BAD_USERNAME_PASSWORD(401, "用户名或密码错误!"),
    BODY_NOT_MATCH(400, "请求的数据格式不符!"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误!"),
    NOT_FOUND(404, "未找到该资源!"),
    NOT_TOKEN(401, "无token，请重新登录!"),
    NOT_TOKEN_MATCH(401, "token无效，请重新登录!"),
    SERVER_BUSY(503, "服务器正忙，请稍后再试!"),
    SUCCESS(200, "成功!") // 数据操作错误定义

    ;

    /**
     * 错误码
     */
    private Integer resultCode;
    /**
     * 错误信息
     */
    private String resultMsg;

    CommonEnum(Integer resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }


    @Override
    public Integer getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}
